(describe-char-unicode-data): Use a hidden buffer for Unicode data file pointed
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 4 Dec 2006 10:20:50 +0000 (10:20 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 4 Dec 2006 10:20:50 +0000 (10:20 +0000)
to by `describe-char-unicodedata-file'.

lisp/descr-text.el

index 8fb28930fbf84c0758b934940a40e4d5037a78ad..361c3b8c15c9bd06282398e1fe00ff220d73f5e0 100644 (file)
@@ -212,11 +212,10 @@ The list is null if CHAR isn't found in `describe-char-unicodedata-file'."
   (when describe-char-unicodedata-file
     (unless (file-exists-p describe-char-unicodedata-file)
       (error "`unicodedata-file' %s not found" describe-char-unicodedata-file))
-    (with-current-buffer
-       ;; Find file in fundamental mode to avoid, e.g. flyspell turned
-       ;; on for .txt.  Don't use RAWFILE arg in case of DOS line endings.
-       (let ((auto-mode-alist))
-         (find-file-noselect describe-char-unicodedata-file))
+    (with-current-buffer (get-buffer-create " *Unicode Data*")
+      (when (zerop (buffer-size))
+       ;; Don't use -literally in case of DOS line endings.
+       (insert-file-contents describe-char-unicodedata-file))
       (goto-char (point-min))
       (let ((hex (format "%04X" char))
            found first last)